<?php
$mainMenu = $sf_user->getAttribute(Globals::SESSION_MAIN_MENU);
$subMenu = $sf_user->getAttribute(Globals::SESSION_SUB_MENU);
?>
<nav id="sidebar" class="sidebar nav-collapse collapse">
    <ul id="side-nav" class="side-nav">
        <li class="<?php if ($mainMenu == "SUMMARY") { echo "active"; }?>">
            <a href="/member/summary"><i class="icon-home"></i><span class="name"><?php echo __('Dashboard'); ?></span></a>
        </li>
        <?php if ($distDB->getRankId() == null) { ?>
        <li class="<?php if ($mainMenu == "PURCHASE_PACKAGE") { echo "active"; }?>">
            <a href="/member/purchasePackage"><i class="icon-reorder"></i><span class="name"><?php echo __('Purchase Package'); ?></span></a>
        </li>
        <?php } ?>
        <li class="panel <?php if ($mainMenu == "REGISTRATION") { echo "active"; }?>" style="">
            <a class="accordion-toggle <?php if ($mainMenu != "REGISTRATION") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#forms-collapse"><i class="icon-edit"></i> <span class="name"><?php echo __('Funds Deposit'); ?></span></a>
            <ul id="forms-collapse" class="panel-collapse collapse <?php if ($mainMenu == "REGISTRATION") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "FUNDS_DEPOSIT") { echo "active"; }?>"><a href="/member/fundsDeposit"><?php echo __('Funds Deposit'); ?></a></li>
                <li style="display: none" class="<?php if ($subMenu == "REGISTRATION") { echo "active"; }?>"><a href="/member/memberRegistration"><?php echo __('Member Registration'); ?></a></li>
                <li class="<?php if ($subMenu == "RELOAD_MT4_FUND") { echo "active"; }?>"><a href="/member/reloadTopup"><?php echo __('Reload MT4 Fund'); ?></a></li>
            </ul>
        </li>
        <?php if ($distDB->getRankId() != null) { ?>
        <li class="panel <?php if ($mainMenu == "BUSINESS_NETWORK") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "BUSINESS_NETWORK") { echo "collapsed"; }?>" data-toggle="collapse" data-parent="#side-nav" href="#stats-collapse"><i class="icon-bar-chart"></i> <span class="name"><?php echo __('Business Network'); ?></span></a>
            <ul id="stats-collapse" class="panel-collapse collapse <?php if ($mainMenu == "BUSINESS_NETWORK") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "SPONSOR_GENEALOGY") { echo "active"; }?>"><a href="/member/sponsorTree"><?php echo __('Sponsor Genealogy'); ?></a></li>
            </ul>
        </li>
        <?php } ?>
        <li class="panel <?php if ($mainMenu == "MY_ACCOUNT") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "MY_ACCOUNT") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#ui-collapse"><i class="icon-magic"></i> <span class="name"><?php echo __('My Account'); ?></span></a>
            <ul id="ui-collapse" class="panel-collapse collapse  <?php if ($mainMenu == "MY_ACCOUNT") { echo "in"; }?>">
                <li style="display: none" class="<?php if ($subMenu == "ACCOUNT_SUMMARY") { echo "active"; }?>"><a href="<?php echo url_for("/member/accountSummary") ?>"><?php echo __('Account Summary'); ?></a></li>
                <li style="display: none" class="<?php if ($subMenu == "ACCOUNT_CONVERT") { echo "active"; }?>"><a href="<?php echo url_for("/member/accountConversion") ?>"><?php echo __('Account Conversion'); ?></a></li>
                <li class="<?php if ($subMenu == "CURRENT_LOG") { echo "active"; }?>"><a href="<?php echo url_for("/member/currentLog") ?>"><?php echo __('Current Account Statement'); ?></a></li>
                <li style="display: none" class="<?php if ($subMenu == "TRADING_LOG") { echo "active"; }?>"><a href="<?php echo url_for("/member/tradingLog") ?>"><?php echo __('Trading Account Statement'); ?></a></li>
            </ul>
        </li>
        <?php if ($distDB->getRankId() != null) { ?>
        <li class="<?php if ($mainMenu == "COMMISSION") { echo "active"; }?>">
            <a href="/member/bonusDetails"><i class="icon-table"></i><span class="name"><?php echo __('Commission'); ?></span></a>
        </li>
        <li class="<?php if ($mainMenu == "FUND_MANAGEMENT") { echo "active"; }?>">
            <a href="/member/fundManagementReturn"><i class="icon-bar-chart"></i><span class="name"><?php echo __('Fund Management Return'); ?></span></a>
        </li>
        <?php } ?>
        <li class="panel <?php if ($mainMenu == "WITHDRAWAL") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "WITHDRAWAL") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#components-collapse"><i class="icon-bookmark-empty"></i> <span class="name"><?php echo __('Banking Request'); ?></span></a>
            <ul id="components-collapse" class="panel-collapse collapse <?php if ($mainMenu == "WITHDRAWAL") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "CURRENT_WITHDRAWAL") { echo "active"; }?>"><a href="<?php echo url_for("/member/currentWithdrawal") ?>"><?php echo __('Current Account Withdrawal'); ?></a></li>
            </ul>
        </li>
        <li style="display: none" class="panel <?php if ($mainMenu == "REPORT") { echo "active"; }?>">
            <a class="accordion-toggle <?php if ($mainMenu != "REPORT") { echo "collapsed"; }?>" data-toggle="collapse"
               data-parent="#side-nav" href="#special-collapse"><i class="icon-asterisk"></i> <span class="name"><?php echo __('Report'); ?></span></a>
            <ul id="special-collapse" class="panel-collapse collapse <?php if ($mainMenu == "REPORT") { echo "in"; }?>">
                <li class="<?php if ($subMenu == "DAILY_REPORT") { echo "active"; }?>"><a href="<?php echo url_for("/report/dailyReport") ?>"><?php echo __('Daily Report');?></a></li>
                <li class="<?php if ($subMenu == "MONTHLY_REPORT") { echo "active"; }?>"><a href="<?php echo url_for("/report/monthlyReport") ?>"><?php echo __('Monthly Report');?></a></li>
            </ul>
        </li>
    </ul>
    <div id="sidebar-settings" class="settings">
        <button type="button"
                data-value="icons"
                class="btn-icons btn btn-transparent btn-sm">Icons</button>
        <button type="button"
                data-value="auto"
                class="btn-auto btn btn-transparent btn-sm">Auto</button>
    </div>
</nav>